package com.rosh.rpc.core.data;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class RpcResponse {

    /**
     * 唯一ID
     */
    private String requestId;

    /**
     * 响应结果
     */
    private Object result;

    /**
     * 异常
     */
    private Throwable cause;



    public boolean isError() {
        return cause != null;
    }
}
